#ifndef THREADEG_H
#define THREADEG_H

#include <QObject>
#include <QMutex>
#include <QByteArray>

struct egEmit
{
    unsigned int id;
    unsigned char buf[128];
};

class threadEg : public QObject
{
    Q_OBJECT

public:
    threadEg(QObject* parent = 0);
    ~threadEg();

    threadEg* GetInstance();

public slots:
    void doWork();

signals:
    void recvData(const struct egEmit& data);

private:
    bool bRun;
    QMutex m_Mutex;
};

#endif // THREADEG_H
